package com.mianshi;

import java.util.Scanner;

/**
 * 统计小于等于自然数n中1的个数
 */
public class mijia {
    public static void main(String[] args) {
//        Scanner in = new Scanner(System.in);
//        int n = in.nextInt();
//        int sum = 0;
//        for(int i = 1; i <= n; i++){
//            sum += calNum(i);
//        }
//        System.out.println(sum);

        System.out.println(cheng(4));
    }

    public static int calNum(int n){
        int ans = 0;
        while(n != 0){
            if(n % 10 == 1){
                ans++;
            }
            n /= 10;
        }
        return ans;
    }

    static int res = 1;
    public static int cheng(int n){
        boolean x = n > 1 && cheng(n-1) > 0;
        res *= n;
        return res;
    }
}
